Skip to content

test(review): full branch coverage for the linked-issue-hard-rules-config src twin - #6040

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:test-lihr-config-src-twin-v3
Jul 15, 2026
Merged

test(review): full branch coverage for the linked-issue-hard-rules-config src twin#6040
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:test-lihr-config-src-twin-v3

Conversation

@jaytbarimbao-collab

Copy link
Copy Markdown
Contributor

Fixes #5845.

src/review/linked-issue-hard-rules-config.ts is a byte-identical twin of the engine copy (a directory-scanned parity pair). The engine copy has full branch coverage via its own test, but the src twin's test only exercised a subset of the normalizer branches.

Test-only: adds the missing src-side cases to reach 100% branch coverage on the twin — isLinkedIssueHardRuleMode valid/invalid; undefined vs string/null top-level input; a fully-valid object (valid modes, label trimming, valid booleans, valid delay); invalid-mode and non-boolean field-default fallbacks; and closeDelaySeconds floor/clamp/invalid handling.

All 65 tests in the file pass; typecheck clean.

…ll branch coverage

Fixes JSONbored#5845.

src/review/linked-issue-hard-rules-config.ts is a byte-identical twin of the
engine copy, but its own test exercised only a subset of the normalizer branches.
Adds the missing src-side cases (isLinkedIssueHardRuleMode, undefined vs
string/null top-level input, a fully-valid object, invalid mode / non-boolean
fallbacks, and closeDelaySeconds floor/clamp/invalid handling), bringing the
src twin to 100% branch coverage. Test-only.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.19%. Comparing base (13afd8f) to head (539aeb5).
⚠️ Report is 18 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6040       +/-   ##
===========================================
+ Coverage   78.09%   95.19%   +17.09%     
===========================================
  Files         592      592               
  Lines       46951    46951               
  Branches    15003    15003               
===========================================
+ Hits        36668    44695     +8027     
+ Misses       8206     1503     -6703     
+ Partials     2077      753     -1324     
Flag Coverage Δ
shard-1 43.92% <ø> (-0.06%) ⬇️
shard-2 36.55% <ø> (+0.14%) ⬆️
shard-3 31.99% <ø> (?)
shard-4 31.95% <ø> (-1.08%) ⬇️
shard-5 32.28% <ø> (+0.92%) ⬆️
shard-6 44.79% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 207 files with indirect coverage changes

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 15, 2026
@loopover-orb

loopover-orb Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-15 07:35:44 UTC

1 file · 1 AI reviewer · no blockers · readiness 98/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a test-only PR adding branch coverage for the src-side twin of linked-issue-hard-rules-config.ts, covering isLinkedIssueHardRuleMode, undefined/string/null inputs, a fully-valid object, invalid-mode/non-boolean fallbacks, and closeDelaySeconds floor/clamp/invalid handling. The assertions are specific and mirror the values described (trimmed labels, defaults, warning messages), and the diff is additive-only against an existing test file with no production code touched. It closes #5845 and is narrowly scoped to closing the coverage gap on the src twin as described.

Nits — 4 non-blocking
  • The comment at test/unit/linked-issue-hard-rules.test.ts:373 references both test(review): cover the src/ linked-issue-hard-rules-config normalizer branches (62.50% branch coverage) #5845 and the engine test file by name — worth double-checking that file path stays accurate if the engine test is ever renamed.
  • test/unit/linked-issue-hard-rules.test.ts: the `for (const bad of ["nope", null as unknown])` loop mixes two distinct invalid-input cases into one test; separate `it` blocks would make failures easier to isolate.
  • Consider splitting the string-vs-null invalid-input case into two named test cases for clearer failure attribution.
  • If the engine and src copies are meant to stay byte-identical, consider a follow-up guard test (e.g., a checksum/diff assertion) so future edits to one twin without the other are caught automatically.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5845
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 105 registered-repo PR(s), 51 merged, 4 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jaytbarimbao-collab; Gittensor profile; 105 PR(s), 4 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ℹ️ Insufficient signal risk: clean · value: insufficient-signal · LLM: minor
Linked issue satisfaction

Addressed
The PR adds targeted test cases in the specified test file for undefined top-level input, invalid-mode fallback with warning, non-boolean flag fallback with warning, and closeDelaySeconds floor/clamp/negative/NaN handling, closely mirroring the five requirement groups called out in the issue.

Review context
  • Author: jaytbarimbao-collab
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 105 PR(s), 4 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 00b3a74 into JSONbored:main Jul 15, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(review): cover the src/ linked-issue-hard-rules-config normalizer branches (62.50% branch coverage)

1 participant